#include <bits/stdc++.h>
using namespace std;

inline int read() {
	int x = 0, f = 0; char ch = getchar();
	while (ch < '0' or ch > '9') f |= (ch == '-'), ch = getchar();
	while (ch >= '0' and ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

int __stk[128], __top;
inline void write(int x) {
    if(x < 0) putchar('-'), x = -x;
	do { __stk[++__top] = x % 10, x /= 10; } while (x);
	while (__top) putchar(__stk[__top--] + '0');
}

const int mod = 998244353;

void Min(int &x, int y) { y < x and (x = y); }
void Max(int &x, int y) { y > x and (x = y); }

void inc(int &x, int y) { (x += y) >= mod and (x -= mod); }
void mul(int &x, int y) { x = 1ll * x * y % mod; }

int q_pow(int x, int k) { int res = 1; for (; k; k >>= 1, mul(x, x)) if (k & 1) mul(res, x); return res; }

bool stmer;

const int N = 1e6 + 10, M = 110;

int n, m, tot;
int a[N], b[M][M], d[M][M];

int fx[4][2] = { { -1, 0 }, { 1, 0 }, { 0, -1 }, { 0, 1 } };

char s[N], ch[3] = { 'R', 'G', 'B' }, out[4] = { 'U', 'D', 'L', 'R' }, ans[N];

bool edmer;
signed main() {
	freopen("snake.in", "r", stdin);
	freopen("snake.out", "w", stdout);
	cerr << "[Memory] " << (&stmer - &edmer) / 1024 / 1024 << " MB\n";
    
    scanf("%s", s), n = strlen(s), m = 100;
    for (int i = 0; i < n; i++) a[i] = (s[i] == 'R' ? 0 : (s[i] == 'G' ? 1 : 2));

    int cnt = 0;
    for (int i = 0; i < m; i++) {
        for (int j = 0; j < m and cnt < n; j++) {
            b[i][j] = a[cnt++];
            if (cnt < n) ans[++tot] = j + 1 == m ? 'D' : 'R';
        } i++;
        for (int j = m - 1; j + 1 and cnt < n; j--) {
            b[i][j] = a[cnt++];
            if (cnt < n) ans[++tot] = j ? 'L' : 'D';
        }
    }

    write(m), putchar(' '), write(m), putchar('\n');
    for (int i = 0; i < m; i++, putchar('\n'))
        for (int j = 0; j < m; j++) putchar(ch[b[i][j]]);
    
    puts("1 1");
    for (int i = 1; i <= tot; i++) putchar(ans[i]);

    cerr << "[Runtime] " << (double) clock() / CLOCKS_PER_SEC << " seconds\n";
	return 0;
} 